Make _.getPath and _.hasPath not consume `ks` argument

When using a partially applied `_.getPath` I noticed it only acted upon the first element in the list. The reason is that it consumes the `ks` argument. I presume `_.getPath` and `_.hasPath` are not supposed to consume any of their arguments.

`shift` [mutates](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift), so I've replaced the shift call with `_.first` and `_.rest` calls.

I've also added a test which asserts that `ks` isn't mutated.

Edit: Of course, if this is by design, please consume this pull request by closing it.