Bug 1028261 - Fix to exit with a non-zero code on errors

The addition of /storage/sdcard0 was originally done to support the flame - it was a random accident that someone added /sdcard on the flame that redirects to /storage/sdcard.