Add system error handling to Rakefile build tasks