Fixed directory output bug

- Fixed issue preventing writing output to another directory
- Added tests to cover primary output use cases
Updated version to 0.2.1