Add a helper function that returns the absolute path for a buffer
Start of rename_buf handler