Update LogUtils.java

Should hopefully fix the bug where it crashes if the directory does not exist. NOT TESTED.