Output directory argument

Added an argument to set the directory for output, which defaults to
user's home directory.