[#7] Changes to compile w/o errors with -Wall
Moved temp test file creation to more logical spot