ENH: handle file paths sanely