Using with statements and slightly reformatted code to conform to PEP8
Prioritizing pom version over parent pom version regardless of their order in the pom.
Merge pull request #1 from stepanv/master

Prioritization of pom's version over parent pom's version