Add path separator support, patch by Sam Bishop.