US stocks close Friday higher, indexes post weekly gains