Make python shell return error codes

Return result 1 for error cases
Output usage on stderr in error cases

Related to #209