Fix problem with non existing directories
Fix problem with UTF-8 encoding
Change Makefile to bash script