Return empty history when failing to create a log
Return empty history when failing to create a log

This fixes an infinite loop with group:up_stack/1 that could be
triggered when commandline history is enabled, but it wasn't possible to
create the log file. In this case, an `ok` atom was being stored as the
history which would confuse the history search.

If you pressed CTRL-R and started typing, an infinite loop would be
started that would eventually terminate when out of memory.

To reproduce:

```sh
$ export ERL_AFLAGS="-kernel shell_history enabled -kernel shell_history_path '\"/proc\"'"
$ erl

Type CTRL-R and then press any key
```

isvilen/otp,erlang/otp,dumbbell/otp,vinoski/otp,dgud/otp,mikpe/otp,potatosalad/otp,dumbbell/otp,vinoski/otp,erlang/otp,erlang/otp,rlipscombe/otp,emacsmirror/erlang,dgud/otp,potatosalad/otp,g-andrade/otp,isvilen/otp,dumbbell/otp,erlang/otp,dumbbell/otp,bjorng/otp,vinoski/otp,g-andrade/otp,emacsmirror/erlang,isvilen/otp,jj1bdx/otp,mikpe/otp,vinoski/otp,g-andrade/otp,rlipscombe/otp,potatosalad/otp,jj1bdx/otp,dumbbell/otp,bjorng/otp,erlang/otp,dgud/otp,mikpe/otp,isvilen/otp,dgud/otp,potatosalad/otp,rlipscombe/otp,g-andrade/otp,rlipscombe/otp,dumbbell/otp,rlipscombe/otp,g-andrade/otp,emacsmirror/erlang,emacsmirror/erlang,erlang/otp,dgud/otp,vinoski/otp,vinoski/otp,potatosalad/otp,g-andrade/otp,jj1bdx/otp,bjorng/otp,dumbbell/otp,jj1bdx/otp,dumbbell/otp,mikpe/otp,jj1bdx/otp,vinoski/otp,isvilen/otp,bjorng/otp,dgud/otp,rlipscombe/otp,jj1bdx/otp,jj1bdx/otp,bjorng/otp,bjorng/otp,dgud/otp,potatosalad/otp,isvilen/otp,mikpe/otp,mikpe/otp,dumbbell/otp,potatosalad/otp,g-andrade/otp,emacsmirror/erlang,emacsmirror/erlang,vinoski/otp,emacsmirror/erlang,rlipscombe/otp,bjorng/otp,jj1bdx/otp,erlang/otp,erlang/otp,g-andrade/otp,isvilen/otp,vinoski/otp,dgud/otp,bjorng/otp,bjorng/otp,rlipscombe/otp,jj1bdx/otp,dumbbell/otp,potatosalad/otp,dgud/otp,isvilen/otp,potatosalad/otp,emacsmirror/erlang,mikpe/otp,vinoski/otp,mikpe/otp,g-andrade/otp,g-andrade/otp,erlang/otp,potatosalad/otp,bjorng/otp,erlang/otp,emacsmirror/erlang,mikpe/otp,rlipscombe/otp,jj1bdx/otp,isvilen/otp,mikpe/otp,rlipscombe/otp,emacsmirror/erlang,isvilen/otp,dgud/otp