These days Algés is consider a quarter of Lisbon and therefore with several bus lines, trains every 10m and tram lines to bring you anyware in the city center.
During the festival more transports are provided to the main spots in Lisbon. Like main stations, tube and hotel areas.
I suggest you to get a small apartment in the quarter of Alfama, the oldest and medieval part of the city, 10m walking distance of the center and a beautiful spot. 5m away from the center of the quarter you have 12 bus lines and 2 tram lines as well as 2 tube stations. As I told you before during the festival you have other bus lines all night running near by going to North train station which is about 10m walk from the center of Alfama quarter. If you are with friends is for sure a nice place to be and to enjoy the local tavernas. In case you want to club all night long you have a tram to bring you to Bairro Alto quarter were everything happens. This tram #28 is very convenient coz is like a door to door transport. Alfama is 2 minutes away from the river. Is just there.
About safety you just have to be careful as anyware else. The same you do at home. Just don't make it easy for them in crowded places or very touristic spots. Portugal compared to most countries is still a very safe country.
To stay I found this site for you. It seemed reasonable to me.
http://lisbon-alfama-apartments.com/joomla/
Don't forget that depending of the quantity of people or days of staying prices in this private apartments can go down. To be very nice, kind and easy going with the owners might lower the price.
Portuguese normally are kind and helpful.
I'm sure you will have a nice time.
Bus lines. Your bus must be the pink line. Check it
http://www.carris.pt/pt/carreiras/
In the site of the festival you have a link with information were to stay as well.
http://www.optimusalive.com/
Good luck.