path is not defined here, I think. I think you also really want to use the content of vim.current.buffer.

you might need the _vim.py module from UltiSnips though to get unicode.