Fixed est archiving dir in rmg_det_to_db.