Fixed getAllFiles to run on platforms without Swing API