The best defense is usually a good offense, and when it comes to travel that means research. How can you stay out of trouble abroad? Check out their laws and customs beforehand, and find out where the nearest embassies and consulates are just in case.
Check out some of these online resources to help you plan your trip: