Pull Request for Issue620

Technically, comparing directories shouldn't have an effect on the state of an object and should probably be a const function.  However, this won't work with how it's implemented by creating a new comparator each time.  Would it make sense to refactor by passing it a comparator?  Or maybe make compartor_ mutable?  Just seems weird to me that something that only compares items technically has the ability to modify states.