Automatically create the cookie directory.
Uses less side-effects and handle errors.
Merge pull request #44 from Ralt/43

Automatically create the cookie directory.