changed amirootcheck

This might be a more secure way to do the root check