Use os.sep instead of assuming that it is '/'.