improved moduleSource() to accept either a character vector or a file path