In many scripting applications you have to create a directory the first time the script is run (for example, to store log files) but not on future runs of the script. Luckily, the Erlang standard libraries provides this useful function that solves this problem nicely.