Fix problem with removing '/' in MacOSX