Add support for destdir option.

- Also some very basic input validation
Which means we shouldn't need this line anymore