Fix a few warnings flagged by PyDev

- Unused import of urlparse
- Unnecessary definition of variable
- Incorrect indentation
Merge pull request #1479 from dpursehouse/fix-warnings

Fix a few warnings flagged by PyDev