Implement error handling in labReturn.sh #12

Implements #12. Minimal testing (c.f. scripts in test/).
Partially implements #11. Untested.