Added a filter to filter out empty path parts.