Added more error checking and chown to repository-clone.rb