Script updated to match homework requirements. Run it by passing the repository dir.