Add module reloading capability to REPL

Module reloading code taken from https://gist.github.com/gleitz/6896099