Fix issue 12: exit correctly if push fails + added test