Update home page image code

Allows root folder to be empty. Moved logic to functions.php.