improvements to argument parsing

When running the default output format (database), an output directory needs to be specified. I added logic to provide an appropriate error if the output directory is missing. I also fixed the extant_file() function so it passes the error it throws properly. Finally, we can use also extant_file() to check if the output directory exists, so I applied that function to the directory argument's type.
Why the extra level of indentation here? It's not nested under a control statement like "if" or "for". I'm not the most adept with Python, but it is a language where whitespace is important, so it seems odd to indent this for no reason.