boot: Improve release directory resolution
boot: Improve release directory resolution

Canonicalizes directory, resolving any symlink,
uses (g)readlink -f where available, or falls back
on hand-rolled function.

Tested under bash and dash v0.5.8. checkbashisms complains
about `command -v` but dash supports it.

bitwalker/distillery,bitwalker/distillery