Fixed broken pipe and keyboard interrupt handling in minecat.