pkgs: Fix traceback on file remove while editing package