Fix a bug that cc.path.dirname