Change open()syntax to 'with open(..)' syntax
Added tests/generated_files directory
modify file path to tests/generated_files
Merge pull request #26 from pebreo/feature

Fix Issues #24 and #25 (thanks @pebreo)