Better handling of unicode prefix_dir on OSX.

This should fix #45 based on @tarekziade suggestion; Tarek can you please sanity-check whether this works for you?  I don't have my OSX machine handy