Remove path.exists and existsSync backwards compatibility

path.exists and path.existsSync were moved to fs.exists and
fs.existsSync in node v0.8. Since package.json requires node version
>= 0.8.16, it is safe to remove the backwards compatibility checks
and rely solely on fs.exists and fs.existsSync.
Use switch/case in getpin

The switch/case structure more naturally represents the intended action
and is cleaner and easier to read.