Added solution for getting filenames from directory.
Major linux migration fixes.
-fpermissive errors fixed.