Fix issue 15 better

I think this fixes Issue 15 better than the issue-15 branch, because that branch seems to cause the previous mode to fail (i.e. if the query is the last element of the path, it returns no results).  With this patch, the following works:

$ cd ~/.mozilla/firefox/foo.bar
$ cd
$ fasd -d foo
1 ~/.mozilla/firefox/foo.bar
$ fasd -d bar
1 ~/.mozilla/firefox/foo.bar
$ fasd -d firefox
1 ~/.mozilla/firefox/foo.bar
$ fasd -d f f b
1 ~/.mozilla/firefox/foo.bar