Adding formula for terminator

Including small patch for cwd resolve.