Add Documentation

Add some documentation comments to the source. `rdoc lib bin README.md LICENCE.md` to get your hands on it :-).
Restore Working Directory After Main Loop

Store the directory that the command was run from and return to the same
directory after the main loop.