Use `cd` with a block:
```rb
cd buildpath do
  system "..."
end
```