Update ctags.py

Use codecs which hopefully works on python 2 and 3