Replaced various uses of malloc with glib versions.

glib versions abort() on failure, so checking the result for NULL is unnecessary.
Fixed expand_homedir to handle paths like "~user" correctly.
plugins/fishlim