Fixed dodgy bash scripts.