Added setResourceDirectory() method.