Add path parameter to cleanup() task

This allows the cleanup() method to be called from different contexts