Fixed ltrim bug in the directory search class.