implement getFolder and magically delete the folders up to the module root in case the parent folders no longer contain files