fix bug for 'readlink: illegal option -- f' under darwin.