make to work with uniquify.el

because uniquify.el change the (buffer-name) result.
make some change to get correct extension
Merge pull request #8 from koko-u/work-with-uniquify

make to work with uniquify.el