fixing appdir for files with dots in them