Simplified realpath.c

Removed unnecessary argument processing, and replaced switch statement with an if statement.