made few changes to fix copying of WAL files.

Made changes in function copy_wal_file and is_local_ip to generate right rsync command to copy the WAL files.