Level set simulation of dislocation dynamics in thin films