rpm/group-source-files.pl: Fix output difference when / is in location
While previous attempt to fix group-source-files.pl in 6d651362c38
"rpm/group-source-files.pl: Deal with {pre,post}fixed / in location"
breaks the infinite loop, it does not properly address the issue. Having
prefixed and/or postfixed forward slash still result in different
output.
This commit changes the script to use the Perl core module File::Spec
for proper path manipulation to give consistent output.
Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>