Do not create hidden directories

Tidied up while at it.

This commit changes file input behavior. In case file input is provided,
output is expected to be a file as well instead of a directory.
0.5.0