Reviewed-by: darcy, weijun
Added new test and made one code change to escape null characters. Reviewed-by: vinnie