added tests and edited run_build.sh
fixed generation of strings with '\0' in them