percent encode \r and \n in filenames. fixes #12