Replace directories/links with files (fixes #580)
Populate ignores upon adding a folder (fixes #996)