Pick non-directory part of the buffer name.