Improve assets.rm handling of folders. Closes #289.