Don't walk over it. Put it in a corner of a room that has little or no traffic over it. You can also cover it with a layer or translucent plastic if it does have alot of traffic and tell guests that you're renovating the ceiling above it.
You can stop your carpet from fraying by taking your area carpet to a professional carpet repair place and have the sides bound. You can also sew a strip of fabric to the back around the edges yourself, or use a fray fix glue from the fabric store.
This is what I would do. Cut out the frayed part. Take hot glue gun and put a dab of glue on the thread that's in the carpet. If this leaves a hole, repair with the thread you cut out, cutting it in small pieces and glueing.
This is always a constant problem, but can be easily fixed with a little skill. Find the same type of thread/yarn, and gently go around the entire edge of the carpet, doing a wrap style stitch. May take a little while, but will work for a decent while.