Optimized commit path filtering so that it doesn't create multiple trees.

Revised the way path filtering is handled so that it supports multiple paths for filtering.