Custom priv_dir fun.