Also, don't use null as a placeholder.
I think you can use an empty string since chrome.fileSystem.restoreEntry() is almost instantaneous.