`expand_path` should be done before forking, while `Dir.pwd` is the user's current directory.

i.e. in l.52

```ruby
@options[:current_dir] = File.expand_path(dir)
```