Do not output a trailing slash after Java programs

Running `cd -` ends up outputting the result directory, which for `/tmp/` is
simply the root directory. This was the cause of our phantom slash that
always was output after a Java file was run. Fixes #11

Signed-off-by: David Celis <me@davidcel.is>