Nice code! I had some minutes off and stumbled upon your code. Please find my comments below and farther below.

Maybe also escape the colon (:) character? I have had some bad experiences with such characters in Graphite.