Fix potential seg fault when an invalid file vpath is requested

I knew I created these is_valid_*num() functions for a reason!
14 jobs for dailybuild_linux-x64 in 9 minutes and 26 seconds (queued for 12 seconds)
Status Job ID Name Coverage
  Build
passed #33702
FreeBSD
jsdoor-freebsd

00:04:10

passed #33703
Linux
jsdoor-linux

00:06:20

passed #33705
FreeBSD
jsdoor-windows

00:01:55

passed #33697
FreeBSD
sbbs-freebsd

00:05:42

passed #33692
Linux
sbbs-linux

00:09:22

failed #33695
Windows
sbbs-windows

00:04:49

passed #33704
FreeBSD
sexpots-freebsd

00:00:14

passed #33693
Linux
sexpots-linux

00:00:21

passed #33696
Windows
sexpots-windows

00:00:39

passed #33700
FreeBSD
syncdraw-freebsd

00:00:27

passed #33701
Linux
syncdraw-linux

00:00:58

passed #33698
FreeBSD
syncterm-freebsd

00:01:01

passed #33694
Linux
syncterm-linux

00:02:48

passed #33699
FreeBSD
syncterm-windows

00:01:48

 
Name Stage Failure
failed
sbbs-windows Build

61 Warning(s)
3 Error(s)

Time Elapsed 00:04:22.96

ERROR(s) occurred
Cleaning up project directory and file based variables
ERROR: Job failed: exit status 1