Initial commit, based on Martin V\"ath's pyrep script
Support also python-3
Fix shebang