Command line version 1.5.4 return values - BUG

I've been toying with the commandline options recently (and even suggested some improvements, see https://groups.google.com/a/arduino.cc/d/msg/developers/3WANmjH9Mwc/AS5Gsr3OuPoJ) but didn't see the problems you are mentioning.

Now, I've been using the git ide-1.5.x version, so perhaps the problem you found was already solved? I'm also running on Linux, so perhaps it's Windows-specific.

I think that there are nightly-builds based on the git versions available, perhaps you could try one of those? Not sure where those are, though (and no time to search right now).