Add support for destdir option.

- Also some very basic input validation