check for directory existence when creating files
handle case where there are no arguments
add test command, add haddock comments