Added windows and os x support for the datadir.

Resolved platform-specific issues for the application datadir.