Added function test_directory to see if the specified directory exists. If it doesn't, program prints a message and exits.
Changed return statement in function test_directory to return None as it is not used. Added code comment for easier reading. First line in a new file will now be the directory from which files were used.
Added header and docstring explaining the module.