change buffer file to buffer dir for pynguest