Move code from test_repositories to devel script to split devel and prerelease scripts