added dir parameter to clean action and added documentation