Improved behaviour of get-readings.sh on newly checked-out repos, also posix compliance.