detect program directory, tabs to spaces