System.cmd path resolution

The way `System.cmd` finds executables right now does not match the description in the docs.

This PR has 3 commits.

  1. In the first commit I simply added tests for the current behaviour.
  2. In the second commit I have changed the implementation to match the docs.
  3. In the third commit I have proposed a new way for `System.cmd` to look for executables.

The reason I'm proposing a breaking change is because the proposed behaviour matches how shells find executables. It also resolves the issue of passing relative paths as commands: according to current docs it should result in an error (or it can be interpreted as unspecified behaviour which is not good either).