Added check for python version 2.7+. Fixes #1.