added directory manipulation functions and tests

Implemented directory creation and removal, including creating a temporary
directory with a random name. Added associated tests.