Add temp fix for warning.h

vs2013 doesn't look for it one level up from vs12sol directory
CppCheck 1.64

reduce scope of j in write_binary()
CppCheck 1.64

fix potential buffer overrun, not sure if it should be n or n-1, went
with n-1
CppCheck 1.64

remove memory leak with tmpstr in register_symbol()