Fix for issue #517.

Now when compiiled with amd option and a single input argument, we are
checking to see whether the input is a file or folder.
Merge pull request #533 from blessenm/amd-precompilation-fix

Fix for the issue #517