From https://github.com/guard/guard/wiki/Add-Readline-support-to-Ruby-on-Mac-OS-X