Magnetic properties of rectangular permalloy prisms: a combined magnetic force microscopy and magneto-optic Kerr study