daemon: Check parameter of base64-out and tar-out before running external command (RHBZ#908322).

For base64-out, check the filename parameter exists and is not a
directory.

For tar-out, check the dir parameter exists and is a directory.