Don't select ".." directory on `:invert s`

This is forbidden and can't be done by user nor shouldn't be done
programatically.

Thanks to filterfalse.
Add and use path.c:is_parent_dir()

For the following reasons:
 - harder to make mistake
 - easier to read and understand
 - easier to change in the future
Merge branch 'fix-invert-s-parent-dir'