Fix support for generating bat files