improve insert snippet handling

nor the insert_snippet works properly on the "def|class|module" line
itself and anywhere within that line without breaking the line into two
parts

[I'm well aware that the changes/code is kind of a mess but I'm normally no python coder and this is also the first time I mess with a sublime plugin]