CB-5250 bb init script calls dirname with unquoted variables

* dirname breaks when the variables point to directories/files with spaces
- the location of `node` is a path containing spaces
- the location of the `BlackBerry` tools is a path containing spaces

Reviewed by James Keshavarzi <kjkeshavarzi@blackberry.com>