netloc embedded: updates to make netloc embeddable

Lots of fixes for relative paths, encapsulated flags, etc.
embedded netloc: add test for embedded netloc

Heavily influenced by the tests/hwloc/embedded test.
TODO: embedded stuff now works