An Adaptive Cartesian Mesh Algorithm for the Euler Equations in Arbitrary Geometries