The / after %s should surely be a %c, with FILE_SEPARATOR as its value.