This function reads a key-value file to a structure. If possible, the values are converted to numbers, otherwise the value is kept as string.
Input:
filename (string): Path to the file.
defaults (struct): A structure merged with read data, can be used to set defaults.
Output: