fix picking required version if it's available, clean up in tweak.py module
fix remarks
add unit test module for tweak.py
Merge pull request #1063 from boegel/fix_pick_version

fix picking required version if it's available, clean up in tweak.py module