fixes #1 Paths that are prefixes of other paths are not reachable

Paths in the completion list are now primarily ordered by path length and only
secondarily by usage frequency. This way prefixes are always prioritized over
the rest even if they are not so frequently used.

Additionally every path in the completion list is now prefixed by its index so
that readline doesn't mess up the order.