Also, I don't think you can safely assume that the current working directory will be the metasploit-framework root directory, so it's probably better to use one of the root constants like so:

```ruby
template = ''
template_pathname = Metasploit::Framework.root.join("data", "templates", "scripts", "to_exe_vba.vb.template")
template_pathname.open("rb") do |f|
  template = f.read
end
```

There's also a root constant in `Msf::Config` somewhere, but I don't remember what it's called.