I would recommend trying AppleScript instead of open for this -
osascript -e 'tell application "terminal"' -e 'do script "cd /path/to/direcory; output/b.o"' -e 'end tell'
This should open a new terminal window, cd to the correct directory then run your program.