fixed emailer module, added tests to catch files with bad syntax