Update Main.java

Added ability to handle spaces in paths.