fix revcode.py and support multiple numbered dirs for install scripts