Actually, I just changed the check to look for the main.js file in that directory, rather than looking for the directory and the file independently, since the directory has to exist for the file to be there.