Properly update current directory of octave process

The directory needs to be updated whenever completion starts since
edited buffers can be located in different directories.