Create output directory if input is a directory, exception if output exists