   @doc """
   Writable temporary directory, exception on error.
 
-  Same as `tmp_dir/0` but raises `System.NoTmpDirError`
+  Same as `tmp_dir/0` but raises `RuntimeError`
   instead of returning `nil` if no temp dir is set.
   """
   def tmp_dir! do
-    tmp_dir || raise NoTmpDirError
+    tmp_dir ||
+      raise RuntimeError, message: "could not get a writable temporary directory, " <>
+                                   "please set the TMPDIR environment variable"
   end
 
   defp write_env_tmp_dir(env) do

  @doc """
  User home directory, exception on error.

  Same as `user_home/0` but raises `System.NoHomeError`
  instead of returning `nil` if no user home is set.
  """
  def user_home! do
    user_home || raise NoHomeError
  end

  defp get_unix_home do

  @doc """
  Current working directory, exception on error.

  Returns the current working directory or raises `RuntimeError`.
  """
  def cwd! do
    cwd ||
      raise RuntimeError, message: "could not get a current working directory, the current location is not accessible"
  end

  @doc """
