Fix some errors in Dart build on Windows

Found some errors which would cause a problem on windows. Note I don't have a windows machine so these couldn't be tested.