* lib/*.py: Added documentation.

* lib/shell.py: Some leniency with the commands.