Jonathan Vollebregt : reg: Add sane_path function to do preliminary key validation.