This fixes a problem on windows where `where.exe` can return multiple lines if the command is found multiple times on the `PATH`. This is especially painful since the recommended `npm install -g flow-bin` creates two `flow` binaries on by default so the entire flow support is broken, as mentioned in #321.
Also added tests.
Reviewed By: nmote
Differential Revision: D3892797
Pulled By: zsol