Ticket 47299 - fix config file and server id processing
Bug Description: get_init_file() was not returning the config file, normalize_server_id()
was not properly extracting the server ID, get_server_id() was not
returning the default instance and need to remove the newline character
from the CONFIG_DIR value, and fixed some wrong variable names.
https://fedorahosted.org/389/ticket/47299
Reviewed by: richm(Thanks!)
(cherry picked from commit 694f914b8d4d149eb2021443e9fd4a21f064316b)