Average rate on 30-year mortgages is up after falling for weeks