Fixed a directory separator issue

Added DIRECTORY_SEPARATOR constant.

When trying to set permissions via a windows machine to a Linux machine the directory separator directions are different, so str_replace won't work, you'll get a Linux path with a windows path appended.