#1031: API for folders and images updated, tests added.