Refactor the sessions module

This just adds a helper function for checking for the "file not found"
read error and corrects small spelling mistakes.