Fixed a minor bug with opening directories.
Updated documentation.