Checking filesystem action return values

Found some warnings in dialyzer, checking `File` return values where appropriate. Can't really check some of the `mkdir` or `rm` returns, since they provide an `error` if the directory already exists or file to be removed doesn't exist.