Add trailing slash if necessary to output dir