ensure that files_dir meets requirements for use as a URI in pandoc