Fix check for PR commit ranges until travis-ci/travis-core#383 is merged.

See #1768 / #2000 for original issue.
See https://github.com/travis-ci/travis-ci/issues/1719#issuecomment-51705110 for origin of this solution.