Updated directory creation

Added OS independent directory creation and path. Untested in Linux.
Working in Windows 7.