Refactored, CHECK_NULL macro, smaller functions.

A new macro, MAX_FN, represents the maximum filename length.
copy_files() has been renamed to handle_files().
The CHECK_NULL macro compacts logic for null-checks.
strnlen is now being used in substitute of strlen.
The actual IO of handle_files() has been split into a new function,
copy_data().