Fixes to JDK installer

This pull request fixes:

1. The installer hangs when installing into a path with spaces.
2. The installer clobbers the system's public JRE.

I've tested this against JDK 1.5, 1.6 and 1.7.