Various Linux fixes
 - fixed tabs bug that worked on Windows
 - fixed directory mode