modification of folder creation method in an attempt to make it work cross-platform