Bug fix: cp tried to cp folders as files