Fixed loading routines so that they are more robust using Allegro's filesystem library.