prevFile.stat was null sometimes, needed a check for that. Broke out the if statements for now so it's easier to follow the logic.
Merge pull request #2 from ripter/emacsBug

prevFile.stat is null sometimes