Added missing fclose statement.

This PR removes a compilation warning about the unused `n_spaces` variable in the `main` function as well as add a missing `fclose` call at its end to close the file (this fixes a warning when running `cppcheck`), even if it’s implicitly closed when the program ends.