Fixed for if you have a complex expression with multiple brackets

As it was, it was resulting in the blank object from minimatch if you had double bracket expressions in the same statement. As such your path would be `lib/some-dir/[object Object]`. This basically checks for that and returns the proper expression.