Fix handling of cleanpath