Penality methods for minimal surfaces with obstacles