New options + bug fixes + README

Bug fixes
Add new options (-i, -o) to specify output dir and input file
Refactor, reindent
Add minimal README.md