implement -t switch to specify a target directory (closes issue #16)

- group main if clause into functions
- group help output
- implement -t switch
- add verbose output if environment is specified