Ensures that the given file (or directory) is marked as modified. If the file (or directory) does not exist, a new file is created.