Fixed a bug that made the .intern and .key file be written to the root directory. They now are written to the same directory as the input file.