I fixed two small issues.

See commits. On the one hand one error message was being unclear, and on the other hand when given a directory parameter (like in -a) it would not work correctly.