Redirect warnings to the logging system on python versions >= 2.6  Refs #3135.
Fix python version checking. Refs #3135
Merge pull request #3146 from s0undt3ch/issues/3135

Redirect warnings to the logging system on python versions >= 2.6  Refs #3135