Fixes #385

I believe this should work just fine, but I need someone to test this
out on Windows and JRuby.