fix to filename_fullpath to append slash for directories