Use `write` directly on the pathname:
```
(bin/'monoberry').write <<-EOS
  #!/bin/sh
  mono #{share}/monoberry/tool/monoberry.exe "$@"
EOS
```