safety - Dont even think about it - unless you want your house to burn down!
Suggest you look at putting a spur from a mains socket up into your loft.
I personally would think twice about putting a PC in a loft as the summer heat (esp this summer!) is very very hot.
An under the stairs cuboard or hall is a best bet - maybe even a garage or garden shed if you have the room (with wireless N!)