Fix makefile portability 

Improve compatibility with mingw
The problem is that mkdir returns a failed exit state if it tries to re-create an already existing directory (IMO that is 100% messed up by Windows/MS). And there doesn't seem to be an easy portable way to test for existing directories! But it seems that we can also use directories as targets within makefiles, which would make the check for existing directories obsolete! If anyone has a better solution for this, please enlighten me!