Adding `bin.mkpath` fixed it, thanks!
Upsteam haxe has already merged my makefile improvement, and I've just force updated this pull request.