Re-added true 1.7 check, converted to POSIX/DASH compatible equality che...

Needed a few more tweaks. This should solve the POSIX/DASH issue from Ubuntu 12.04. Tested on Ubuntu 12.04 and CentOS 6.5.