Close #351, Close #307 Move requirements.txt handling to get_metadata.py

* Move requirements.txt handling to get_metadata.py.
* Close #307, conditionals in lambda not supported in pythons 2.4.x.
* Close #351, correctly handle dependencies in requirements.txt.
* Tested with python 2.4.6, 2.6.5, 2.7.3 and 3.3.0.