Add code to parse a debug category string

Use strdup to be able to use strtok on the category string and add
a test case. Also safe some more information to be able to use color
in the print statement.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f7cfd54..f964be1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1 +1 @@
-SUBDIRS = timer
+SUBDIRS = debug timer