fix debug output of scheduler

When print the thread names, we should use "%.*s" instead of bare "%s".
Merge pull request #141 from grissiom/fix-schedule-debug

fix debug output of scheduler