lib: reduce platform specific branching
lib: reduce platform specific branching

We do quite a bit of branching when dealing with platform specific
paths.

This reduces the amount of branching by reducing it to a table, which
again removes false negatives when dealing with test coverage reporting.

caspervonb/node-browser_process