Improved implementation of ResourceRepository::initDirectory()
Added type information to ResourceLocatorInterface
Fixed calls to assert()