bug fix for mac and current julia version

Some bug fix for mac and current julia version.
I have also disable the readline code which cause segfault.

Sorry for removing all the trailing spaces...