luci has separate validation for directories and files, make sure to use the right one. Signed-off-by: Karl Palsson <karlp@etactica.com>