More error handling. Fix some slight issues with paths
push_changes gets a path with a trailing slash.