Update source.py

* add ability to auto-detect patch levels, issue #447