See Twitter conversation

https://twitter.com/scy/status/402570003251462144

Additionally changed to POSIX compliant loop as per:
http://stackoverflow.com/a/1445562