Fixed regex to actually follow APT requirements
previous implementation would overwrite the file name and
potentially include characters that would cause apt to ignore
the pref file