micro-optimization: don't use Symbol::gensym for perl >= 5.8.0
micro-optimization: execute less code if not debugging

especially the call to basename() is somewhat expensive.
Merge pull request #1 from eserte/srezic-micro-optimization

micro optimization