   Please note that all the modules defined in the same file as `module`
   are recompiled and reloaded.
   """
-  def r(module) do
+  def r(module) when is_atom(module) do
     case do_r(module) do
       mods when is_list(mods) -> { module, mods }
       other -> other

  end

  @doc """
  Prints the list of all loaded modules with paths to their corresponding .beam
  files.
  """
  def m do
    all    = Enum.map :code.all_loaded, fn { mod, file } -> { inspect(mod), file } end

  Produces a simple list of a directory's contents.
  If `path` points to a file, prints its full path.
  """
  def ls(path // ".") when is_binary(path) do
    path = expand_home(path)
    case File.ls(path) do
      { :ok, items } ->
