Added ZEROINSTALL_PORTABLE_BASE support and unit-tests