Improve error handling in gear script

Add UsageException

Switch puts/raise 255 to raise UsageException